//
//  PaySuccessViewController.m
//  YaDiuDiu
//
//  Created by 欧洪飞 on 2017/10/20.
//  Copyright © 2017年 jy. All rights reserved.
//

#import "PaySuccessViewController.h"

#import "MyOrderViewController.h"
#import "DianPuViewController.h"
#import "JiaZDetViewController.h"
@interface PaySuccessViewController ()
@property (weak, nonatomic) IBOutlet UIButton *btnBack;
@property (weak, nonatomic) IBOutlet UIButton *btnWatch;
@property (weak, nonatomic) IBOutlet UILabel *price;


@end

@implementation PaySuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self showNav:@"支付"];
    [self loadUI];
    
}

- (void)loadUI{
    _btnBack.layer.cornerRadius = 5.0;
    _btnBack.layer.borderWidth = 1.0;
    _btnBack.layer.borderColor = [UIColor lightGrayColor].CGColor;
    
    _btnWatch.layer.cornerRadius = 5.0;
    _btnWatch.layer.borderWidth = 1.0;
    _btnWatch.layer.borderColor = [UIColor lightGrayColor].CGColor;
    
    _price.text = _asd;
}
//
- (IBAction)clickBack:(id)sender {
    DianPuViewController *shopDetail = [DianPuViewController new];
    for (UIViewController *controller in self.navigationController.viewControllers) {
        if ([controller isEqual:shopDetail]) {
            [self.navigationController popToViewController:controller animated:YES];
        }
    }
    
//    [self.navigationController popViewControllerAnimated:YES];
    
//    JiaZDetViewController *det = [[JiaZDetViewController alloc] init];
//    [self.navigationController popToViewController:det animated:YES];
//    [self.navigationController popToRootViewControllerAnimated:YES];
}
//
- (IBAction)clickWatch:(id)sender {
    MyOrderViewController *order = [[MyOrderViewController alloc] init];
    [self.navigationController pushViewController:order animated:YES];
    
}

- (void)setAsd:(NSString *)asd{
    _asd = asd;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
